<?php
if (Yii::app()->params['html_compress'] == 1) {
    include ROOT_PATH . '/lib/minify/compress_html.php';
    ob_start('replace_tabs_newlines');
}
$base_path = Yii::app()->baseUrl;
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title><?php echo CHtml::encode($this->pageTitle); ?></title>
        <link href="<?php echo $base_path ?>/css/style.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo $base_path ?>/css/ui-lightness/jquery-ui.css" rel="stylesheet" type="text/css" />
        <link href="<?php echo $base_path ?>/css/mystyle.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript" src="<?php echo $base_path ?>/js/jquery.js"></script>        
    </head>

    <body>
        <div id="wrapper">
            <!--Begin header -->
            <?php echo $this->renderPartial('/layouts/header', array('data' => $data)); ?>            
            <!-- End header -->

            <?php echo $content; ?>

            <!-- begin footer -->
            <?php echo $this->renderPartial('/layouts/footer2'); ?>
            <!-- end footer -->
        </div>
        <script type="text/javascript" src="<?php echo $base_path ?>/js/script.js"></script>
        <script type="text/javascript" src="<?php echo $base_path ?>/js/jquery-ui.js"></script>
        <input type="hidden" id="base_path" value="<?php echo $base_path; ?>" />
        <input type="hidden" id="domain" value="<?php echo Yii::app()->params['domain']; ?>" />
    </body>
</html>
<?php
if (Yii::app()->params['html_compress'] == 1) {
    ob_end_flush();
}
?>